<!--首页私人定制模块-->
<template>
  <div class="musicCalendar">
    <div class="tips tipsColor">{{custom.uiElement.mainTitle.title}}</div>
    <div class="header">
      <h4 class="title">{{custom.uiElement.subTitle.title}}</h4>
      <span class="more">{{custom.uiElement.button.text}}<van-icon name="arrow" /></span>
    </div>
    <div class="content">
      <div class="scroll" :style="{width:w + '%'}">
        <div class="item" v-for="(item,index) in custom.creatives" :key="index">
          <div class="list" v-for="list in item.resources" :key="list.resourceId">
            <img :src="list.uiElement.image.imageUrl" alt="">
            <div class="info">
              <div class="mainTitle">{{list.uiElement.mainTitle.title}}</div>
              <div class="subTitle" v-if="list.uiElement.subTitle">{{list.uiElement.subTitle.title}}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["custom"],
  data() {
    return {
      w: null,
    };
  },
  created() {
    this.w = 4 * 95;
  },
};
</script>

<style lang="less" scoped>
.musicCalendar {
  background: #fff;
  padding: 4vw 2.666vw;
  margin-bottom: 2.666vw;
  .header {
    padding-bottom: 2.666vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .more {
      color: #474747;
      border: 2px solid #f6f6f6;
      padding: 1vw 1.5vw;
      display: flex;
      align-items: center;
      font-size: 12px;
      border-radius: 15px;
    }
  }
  .content{
    overflow-x: scroll;
    .item{
      width: 95%;
      margin: 0 2.666vw;
      .list{
        display: flex;
        padding: 1.333vw 0;
        .info{
          display: flex;
          flex: 1;
          flex-direction: column;
          justify-content: center;
          border-bottom: 1px solid #f8f8f8;
          padding:1.333vw;
          .mainTitle{
            color: #3d3d3d;
            font-size: 16px;
            font-weight: 600;
          }
        }
      }
      img{
        width: 50px;
        border-radius: 10px;
      }
    }
  }
}
</style>